package com.wu.service;

import com.wu.pojo.po.paperPo.Answer;
import com.wu.pojo.po.paperPo.Counter;

import java.util.List;


public interface AnswerService {

    List<Answer> queryAnswerByRemark(String questionId, String remark);

     List<Answer> queryAnswer();

     List<Answer> queryAnswerByPaperId(String paperId);

     List<Answer> queryAnswerByQuestionId(String questionId);

     Answer queryAnswerById(String id);

    boolean insertAnswer(Answer answer);

    /**
     * @params answer问题列表 counter 问卷指数
     * 答案批量入库
     */
    boolean insertAnswerAndCounter(List<Answer> answer,Counter counter);

    boolean updateAnswer(Answer answer);

    boolean deleteAnswer(String id);

    boolean deleteAnswerByPaperId(String paperId);

    int countAnswer(String paperId, String questionId);

    List<Answer> queryAnswerByPaperIdAndUserId(String paperId,String userId);

    Answer queryAnswerByPaperIdAndUserIdAndQuestionId(String paperId,String userId,String questionId);

}
